package yoava;

import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;

import org.apache.http.client.ClientProtocolException;

import util.HttpClientUtility;
import gui.ava.html.image.generator.HtmlImageGenerator;

public class YoavaSample {
	public static void main(String[] args) throws ClientProtocolException, IOException, URISyntaxException {
		System.setProperty("http.proxyHost", "172.20.230.5");
		System.setProperty("http.proxyPort", "3128");
		String html = HttpClientUtility.getStrByHttp(new URI("http://www.google.com.hk/search?sourceid=chrome&ie=UTF-8&q=wedding+flowers+los+angeles+ca"));
		HtmlImageGenerator imageGenerator = new HtmlImageGenerator();
//		imageGenerator.loadUrl("http://ditu.google.cn/maps?hl=zh-CN&newwindow=1&safe=strict&gs_upl=890014l890887l0l891153l7l5l0l0l0l0l0l0ll0l0&um=1&ie=UTF-8&q=florist&fb=1&hq=florist&hnear=0x35b27040b1f53c33:0x295129423c364a1,%E4%B8%AD%E5%9B%BD%E4%B8%8A%E6%B5%B7%E5%B8%82&ei=fetgTv6LOoSjiAfG_r1I&sa=X&oi=local_group&ct=image&ved=0CBAQtgM");
		imageGenerator.loadHtml(html);
//		imageGenerator.loadUrl("http://www.google.com.hk/search?sourceid=chrome&ie=UTF-8&q=wedding+flowers+los+angeles+ca");
		imageGenerator.saveAsImage("goolge3.png");
	}
}
